<?php
	/**
	 * 自动取消订单
	 * 超时15分钟
	 */
	$Order = M('Order');
	$where['flag'] = 1;
	$where['status'] = 1;
	$where['_string'] = 'UNIX_TIMESTAMP() > (create_time + 900)';
	$code = $Order->where($where)->getField('GROUP_CONCAT(code)');
	if(!empty($code)){
		//数量回补
		backProductNum($code);
		$data['status'] = -1;
		$data['update_time'] = time();
		$Order->where($where)->save($data);
	}
?>